﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using WTM.Model;


namespace WTM.ViewModel.BaseData.Work_RyVMs
{
    public partial class Work_RyTemplateVM : BaseTemplateVM
    {
        public ExcelPropety Works_Excel = ExcelPropety.CreateProperty<Work_Ry>(x => x.WorksId);
        public ExcelPropety Ry_Excel = ExcelPropety.CreateProperty<Work_Ry>(x => x.RyId);
        [Display(Name = "分配状态")]
        public ExcelPropety Fpzt_Excel = ExcelPropety.CreateProperty<Work_Ry>(x => x.Fpzt);
        [Display(Name = "备注")]
        public ExcelPropety Remark_Excel = ExcelPropety.CreateProperty<Work_Ry>(x => x.Remark);

	    protected override void InitVM()
        {
            Works_Excel.DataType = ColumnDataType.ComboBox;
            Works_Excel.ListItems = DC.Set<Works>().GetSelectListItems(Wtm, y => y.work);
            Ry_Excel.DataType = ColumnDataType.ComboBox;
            Ry_Excel.ListItems = DC.Set<Ry>().GetSelectListItems(Wtm, y => y.Xm);
        }

    }

    public class Work_RyImportVM : BaseImportVM<Work_RyTemplateVM, Work_Ry>
    {

    }

}
